package gigapaint;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Point;
import java.io.Serializable;

public class MyPoint implements Paintable, Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -8017823148131227490L;
	private Point point;
	private Color color;
	private int size;
	public MyPoint(Point point, Color color, int size)
	{
		this.point = point;
		this.color = color;
		this.size = size;
	}

	@Override
	public void painting(Graphics2D g2d, boolean isDotted)
	{
		BasicStroke b;
		g2d.setPaint(color);
		
		b = new BasicStroke(size);
		g2d.setStroke(b);
		g2d.drawLine(point.x, point.y-size/10, point.x, point.y+size/10);		
	}

	@Override
	public void setEnd(Point point)
	{
		this.point = point;
		
	}

}
